<template>
  <el-tabs v-model="activeName" class="custom-tabs" @tab-change="onTabChange">
    <el-tab-pane v-for="item in SerialCount" :label="$t('pageStr.serialStr')+' '+item" :name="item" lazy>
      <serial-interface :serial-id="activeName" />
    </el-tab-pane>
  </el-tabs>
</template>

<script setup>
import SerialInterface from './SerialInterface.vue'
import { ref } from 'vue'
import {localGet} from "@/utils";
const SerialCount = localGet('token')?.numS // 串口数
console.log('串口数', SerialCount)
const activeName = ref(1)
function onTabChange(name) {
  console.log('tab切换', name)
}
</script>

<style scoped>

</style>